<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>::Happy - DTAC Prepaid Phone::</title>
<link href="${RESOURCE}/css/global.css" rel="stylesheet" type="text/css">
<link href="${RESOURCE}/css/global-en.css" rel="stylesheet" type="text/css">
<link href="${RESOURCE}/css/customize.css" rel="stylesheet" type="text/css">
<script language=JavaScript>

function printWindow(){

browserVersion = parseInt(navigator.appVersion)

if (browserVersion >= 4) window.print()

}



function include(xUrl,xId) {

  var xmlhttp = false;

  /*@cc_on @*/

  /*@if (@_jscript_version >= 5)



  // JScript gives us Conditional compilation, we can cope with old IE versions.

  // and security blocked creation of the objects.

  try {

    xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");

   } catch (e) {

      try {

        xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");

      } catch (E) {

        xmlhttp = false;

      }

   }



  /*@end @*/

  if (!xmlhttp && typeof XMLHttpRequest!='undefined') {

    xmlhttp = new XMLHttpRequest();

  }



  xmlhttp.open("GET", xUrl,true);

  xmlhttp.onreadystatechange=function() {

          if (xmlhttp.readyState==4) {

                document.getElementById(xId).innerHTML = xmlhttp.responseText;

          }

  }

  xmlhttp.send(null)

}

function MM_preloadImages() { //v3.0

  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();

    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)

    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}

}

function MM_preloadImages() { //v3.0

  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();

    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)

    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}

}

function MM_openBrWindow(theURL,winName,features) { //v2.0

  window.open(theURL,winName,features);

}



function doSubmit(){



var packCodeSelect =  getCheckedValue(document.form1.package);

var packCodeValue = packCodeSelect.split("|");

var packCode = packCodeValue[0];

var regsAmnt = packCodeValue[1];

var allwAppyFlag = packCodeValue[2];

var warnMssg = packCodeValue[3];

	if (allwAppyFlag != "N"){

		var element  = getCheckedId(document.form1.package)

		 //var d = document.form1;

		 var  confirmMsg = "<div align='left'><span class='textnormal'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;You have applied for " + element + ".";

		      if (regsAmnt > 0){

			confirmMsg += " Subscription fee of " + regsAmnt +" baht will be deducted from you account. " ;

		       }

		       confirmMsg += "</span></dev>";

		      if (warnMssg != ""){

		         	confirmMsg += "<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" + warnMssg ;

		       }

              	       confirmMsg += "<br><br><div align='center'><span class='textnormal'>Please confirm this transaction.</span></dev><br><br>";

		//d.ExistNo.value = existNo;

            		//d.NewNo.value = newNo;   

            		//d.action="/bp3/bin/Dspc/DpromptSpecialNoApply";                   

            		//d.txtEditSpecialNo.focus();

           		confirmDialog(confirmMsg,  "500", "220"); 

	}else{

		document.form1.submit();

	}

}



function confirmDialog(msgParam,  w, h){

   if( w == "") w=400;

   if(h == "") h=200;

   w = 375;

   h = 270;

   var l = (screen.width - w) / 2; 

   var t = (screen.height - h ) / 2;

   msg = msgParam;

	document.forms[0].hdConfirmMsg.value = msg;

	window.open("/bp3/bin/DpromptSpecialNoConfirm?lang=E", "tinyWindow", "width=" + w + ", height=" + h + ", top=" + t + ", left=" + l);   

}



function getCheckedValue(radioObj) {

	if(!radioObj)

		return "";

	var radioLength = radioObj.length;

	if(radioLength == undefined)

		if(radioObj.checked)

			return radioObj.value;

		else

			return "";

	for(var i = 0; i < radioLength; i++) {

		if(radioObj[i].checked) {

			return radioObj[i].value;

		}

	}

	return "";

}



function getCheckedId(radioObj){

//var f = document.forms[0];

	//var element = "";

	if(!radioObj)

		return "";

	var radioLength = radioObj.length;

	if(radioLength == undefined)

		if(radioObj.checked)

			return radioObj.id;

		else

			return "";

	for(var i = 0; i < radioLength; i++) {

		if(radioObj[i].checked) {

			return radioObj[i].id;

		}

	}

	

return "";

}



</script> 
</head>
<body>
<div id="header">
    <%@include file="../head.jsp" %>
</div>

<div id="container">
	<div id="pathway">
	<A href="/bp3/bin/DpromptIndex" class="link2">Web Service</A> &gt; 
	<a href="/bp3/bin/Dspc/DpromptWelcome"  class="link2">Profile and Service</a> &gt;  
	Special No
	</div>
	<div id="main">
    	<%@ include file="../menu.jsp" %>
    	<div id="content">
        	<div class="content-middle">
                
                <!--เนื้อหาเริ่มที่นี่-->
                <h3><img src="${RESOURCE}/eng/images/14_webservice_head01.gif"></h3>
               	<table width="100%" cellpadding="2" cellspacing="2" height="500">
                  	<tr>
                    	<td valign="top">
						
						
						
						<div align="center">
						
						
						

<form name="form1" method="post"> 

<input type="hidden" name="hdConfirmMsg" value="">



                                <table width="650" border="0" cellspacing="0" cellpadding="0">

                                  <!--SVLT.VAR:CONF_TOP-->

                                  <tr> 

                                    <td> <table width="100%" border="0" cellspacing="3" cellpadding="0">

                                        <tr> 

                                          <td width="2%"><img src="${RESOURCE}/eng/images/14_webservice_bullet01.gif" width="9" height="9"></td>

                                          <td width="98%" class="textnormal_bold"><img src="${RESOURCE}/eng/images/14_webservice_subtitle05_2.gif" width="350" height="22"></td>

                                        </tr>

                                        <tr> 

                                          <td>&nbsp;</td>

                                          <td class="textnormal">An additional promotion 

                                      that lets you call one Happy Special Number 

                                      for only 0.25 Baht per minute, 24 hours 

                                      (dtac number). Call to other numbers will 

                                      be charged as your current promotion. To 

                                      learn more, <span class="link"><a href="http://www.happy.co.th/en/low/02_1003_famous_people_02.php" target="_blank">please 

                                      click</a> </span></td>

                                        </tr>

                                      </table></td>

                                  </tr>

                                  <tr> 

                                    <td height="15" align="center"></td>

                                  </tr>

                                  <tr> 

                                    <td height="7" align="center"><table width="80%" border="0" align="center" cellpadding="2" cellspacing="5">

                                        <tr> 

                                          <td width="45%" align="right" valign="top" class="textnormal_bold">Your Happy Mobile Number :</td>

                                          <td align="left" class="textnormalred"> 

                                            <!--SVLT.VAR:SUBR_NUMB-->

                                          </td>

                                        </tr>

                                        <tr> 

                                          <td align="right" valign="top" class="textnormal_bold">Your Current Promotion :</td>

                                          <td align="left" class="textnormalred"> 

                                            <!--SVLT.VAR:CURRENT_PACK_DESC-->

                                          </td>

                                        </tr>

                                        <tr> 

                                          <td align="right" class="textnormal_bold">&nbsp;</td>

                                          <td align="left"><a href="#"></a></td>

                                        </tr>

                                      </table></td>

                                  </tr>

                                  <tr> 

                                    <td  align="center" bgcolor="#FAF9F4">&nbsp;</td>

                                  </tr>

                                  <tr id="list"> 

                                    <td align="center" ><table width="80%" border="0" cellpadding="0" cellspacing="1" bgcolor="#999999">

                                        <tr bgcolor="#0099CC"> 

                                          <td height="30" colspan="2" align="center" bgcolor="#FF0000" class="textnormalwhite"><span class="textnormalwhite"><strong>To apply for Happy Special Number, choose from these&nbsp;<!--SVLT.VAR:NO_FF_PACK-->&nbsp; promotions</strong></span></td>

                                        </tr>

										 <!--SVLT.LOOP:resultList-->

                                        <tr bgcolor="#FFFFFF"> 

                                          <td  height="30"  class="textnormal" align="center"> 

                                            <table width="90%" border="0" cellspacing="2" cellpadding="2">

                                              <tr> 

                                                <td width="2%"><input type="radio" name="package" id="<!--SVLT.VAR:longDesc-->"  value="<!--SVLT.VAR:packCode-->|<!--SVLT.VAR:regsAmnt-->|<!--SVLT.VAR:allwAppyFlag-->|<!--SVLT.VAR:warnMssg-->"  

                                                  <!--SVLT.VAR:packChck-->/></td>

                                                <td width="98%" class="textnormal"><!--SVLT.VAR:longDesc--></td>

                                              </tr>

                                            </table> </td>

                                        </tr>

										 <!--SVLT.END:resultList-->

                                      </table>

                                      <br> <br> <table width="250" border="0" align="center" cellpadding="5" cellspacing="0">

                                        <tr align="center" valign="top"> 

                                          <td><a href="javascript:doSubmit()"><img src="${RESOURCE}/eng/images/14_webservice_submit.gif" width="58" height="23" border="0"></a></td>

                                        </tr>

                                      </table></td>

                                  </tr>

                                  <tr id="notHaveList"> 

                                    <td height="8" align="center" bgcolor="#FAF9F4"><br><br>

									<!--SVLT.VAR:NOT_HAVE_PACK_LIST--><br><br>

									</td>

                                  </tr>

                                  <tr> 

                                    <td height="8" align="center" bgcolor="#FAF9F4">&nbsp;</td>

                                  </tr>

                                  <!--SVLT.VAR:CONF_BOTTOM-->

                                </table>

</form>
						
						
						</div>
						
						
						
						</td>
                 	</tr>
              	</table>                
                <!--เนื้อหาสิ้นสุดที่นี่-->
                
            </div>
            <div class="content-bottom"></div>
        </div>
    </div>
</div>
<div id="footer">
<img src="${RESOURCE}/eng/images/copy_right.jpg" />
<a href="http://www.dtac.co.th" target="_blank"><img src="${RESOURCE}/eng/images/dtact_logo.jpg" border="0" /></a>
<a href="http://www.happyvirus.com" target="_blank"><img src="${RESOURCE}/eng/images/virus_icon.jpg" border="0" /></a>
</div>

<script type="text/JavaScript">  

	  		

		if ("<!--SVLT.VAR:NOT_HAVE_PACK_LIST-->" == ""){

			document.getElementById ("list").style.display="";

			document.getElementById ("notHaveList").style.display="none";

		 }else{

			document.getElementById ("list").style.display="none";

			document.getElementById ("notHaveList").style.display="";

		}

</script>


</body>
</html>
